#include <stdio.h>
#include <vector>
using namespace std;

int LetterIndex( char ch )
{
	return ( (int)ch - 65 );
}

char IndexLetter( int index )
{
	return (char)(index + 65);
}

int main()
{
	int M, N, P;
	scanf( "%d %d %d", &N, &M, &P );

	const int LETTERS_COUNT = 26;
	vector<int> letters( LETTERS_COUNT );

	char buf[101];
	for( int i = 0; i < N; ++i )
	{
		scanf( "%s", buf );
		for( int j = 0; j < M; ++j )
			++letters[ LetterIndex( buf[j] ) ];
	}

	for( int i = 0; i < P; ++i )
	{
		scanf( "%s", buf );
		char* pos = buf;
		while( *pos )
			--letters[ LetterIndex( *pos++ ) ];
	}

	for( int i = 0; i < LETTERS_COUNT; ++i )
	{
		const char letter = IndexLetter( i );
		const int repeat_cnt = letters[i];
		//printf( "%c %d\n", letter, repeat_cnt );
		for( int j = 0; j < repeat_cnt; ++j )
			printf( "%c", letter );
	}

	return 0;
}

